#! /usr/bin/env python
"""Set up resource paths and start the game."""

import sys
from os import path

try:
    __file__
except NameError:
    pass
else:
    rel = lambda s: path.abspath(path.join(path.dirname(__file__), s))
    sys.path.insert(0, rel("src"))
    sys.path.insert(0, rel("lib.zip"))

import pyglet

# add image/sound search path
pyglet.resource.path.append('data')
pyglet.resource.reindex()

# add font search path
pyglet.font.add_directory("data")

# run the game!
import main
main.main()
